/*
 * SimpleTreAMatchingParams.java
 *
 * Copyright(c) 2010
 * Michael Kroez
 * kroez@studiorutton.de
 *
 * All rights reserved.
 *
 * $Id$
 * 
 */

package de.studiorutton.tre;

public class SimpleTreAMatchingParams {
	private static SimpleTreAMatchingParams INSTANCE;
	
	public final static int LAZY_MATCHING_PARAMS = 0;
	public final static int MID_MATCHING_PARAMS = 1;
	public final static int STRICT_MATCHING_PARAMS = 2;
	private regaparams_t lazyParams = new regaparams_t();
	private regaparams_t midParams = new regaparams_t();
	private regaparams_t strictParams = new regaparams_t();
	
	private SimpleTreAMatchingParams() {
		lazyParams.setCost_ins(1);
		lazyParams.setCost_del(1);
		lazyParams.setCost_subst(2);
		lazyParams.setMax_cost(2);
		lazyParams.setMax_ins(1);
		lazyParams.setMax_del(1);
		lazyParams.setMax_subst(1);
		lazyParams.setMax_err(2);
	
		midParams.setCost_ins(1);
		midParams.setCost_del(1);
		midParams.setCost_subst(1);
		midParams.setMax_cost(1);
		midParams.setMax_ins(1);
		midParams.setMax_del(1);
		midParams.setMax_subst(1);
		midParams.setMax_err(1);
	
		strictParams.setCost_ins(1);
		strictParams.setCost_del(1);
		strictParams.setCost_subst(1);
		strictParams.setMax_cost(0);
		strictParams.setMax_ins(0);
		strictParams.setMax_del(0);
		strictParams.setMax_subst(0);
		strictParams.setMax_err(0);
	}
	
	public static SimpleTreAMatchingParams getInstance() {
		if ( INSTANCE == null ) {
			INSTANCE = new SimpleTreAMatchingParams();
		}
		return INSTANCE;
	}
	
	public static regaparams_t lazyParams() {
		return getInstance().lazyParams;
	}
	
	public static regaparams_t midParams() {
		return getInstance().midParams;
	}
	
	public static regaparams_t strictParams() {
		return getInstance().strictParams;
	}
}
